﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;
using H3GLiveTile.Resources;
using VodafoneLiveTile;

namespace H3GLiveTile
{
    public class Config
    {
        public static string Version = "1.2";
        public static string channelName = "H3GLiveTile";
        public static string updateAdsUrl = "http://fboscari.altervista.org/GetAds.php";
        public static string crackUrl = "http://fboscari.altervista.org/submit_string.php/?tab=Suggerimenti&applicazione=H3GLiveTile&dataora=";

        private static string updateCountersUrl = "http://fboscari.altervista.org/H3G/H3GCounters.php";
        private static string updateToastsUrl = "http://fboscari.altervista.org/H3G/H3GToasts.php";
        private static string updateTileUrl = "http://fboscari.altervista.org/H3G/H3GUpdateAll.php?";
        private static string sendAccountDataUrl = "http://fboscari.altervista.org/H3G/H3GManageUris.php?";

        private static string updateCountersUrl_business = "http://fboscari.altervista.org/H3GBusiness/H3GBusinessCounters.php";
        private static string updateToastsUrl_business = "http://fboscari.altervista.org/H3GBusiness/H3GBusinessToasts.php";
        private static string updateTileUrl_business = "http://fboscari.altervista.org/H3GBusiness/H3GBusinessUpdateAll.php?";
        private static string sendAccountDataUrl_business = "http://fboscari.altervista.org/H3GBusiness/H3GBusinessManageUris.php?";

        public static string createNewAccountUrl = "https://areaclienti.tre.it/selfcare/areaclienti133/4676_registration_ITA_HTML.xsl";
        public static string UtilizationsName = Strings.Title;
        public static void LoadDefaultCounter(List<Counter> list)
        {
            list.Add(new Counter(1, "H3G Credito", ""));
        }
        public static Boolean LoggedInCondition(string html)
        {
            return !html.Contains("Error") && html.Contains("Numbers");
        }
        public static Boolean IsBusinessCondition(string html)
        {
            return html.Contains("Business");
        }

        public static string get_updateCountersUrl(bool isBusiness)
        {
            if (isBusiness)
                return updateCountersUrl_business;
            else
                return updateCountersUrl;
        }

        public static string get_updateToastsUrl(bool isBusiness)
        {
            if (isBusiness)
                return updateToastsUrl_business;
            else
                return updateToastsUrl;
        }

        public static string get_updateTileUrl(bool isBusiness)
        {
            if (isBusiness)
                return updateTileUrl_business;
            else
                return updateTileUrl;
        }

        public static string get_sendAccountDataUrl(bool isBusiness)
        {
            if (isBusiness)
                return sendAccountDataUrl_business;
            else
                return sendAccountDataUrl;
        }
    }
}
